#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
	vector<int> numsSameConsecDiff(int N, int K) {
		if (N == 1) { return { 0,1,2,3,4,5,6,7,8,9 }; }

		vector<vector<int>> dp(N + 1);
		dp[1] = { 1,2,3,4,5,6,7,8,9 };
		int start = 0, end = 0;
		for (int i = 2; i <= N; i++) {
			for (int j = 0; j < dp[i - 1].size(); j++) {
				if (K == 0) {
					dp[i].push_back(dp[i - 1][j] * 10 + dp[i - 1][j] % 10);
				}
				else {
					if (dp[i - 1][j] % 10 + K <= 9) {
						dp[i].push_back(dp[i - 1][j] * 10 + dp[i - 1][j] % 10 + K);
					}
					if (dp[i - 1][j] % 10 - K >= 0) {
						dp[i].push_back(dp[i - 1][j] * 10 + dp[i - 1][j] % 10 - K);
					}
				}
			}
		}
		return dp[N];
	}
};
int main()
{
	return 0;
}